@extends('layouts.app')
@section('content')
<div class="container task">
    @include('task/_createForm')


    <ul id="myTab" class="nav nav-tabs">
        <li class="active">
            <a href="#buildTask" data-toggle="tab">未完成</a>
        </li>
        <li>
            <a href="#completeTask" data-toggle="tab">已完成</a>
        </li>
    </ul>
    <div id="myTabContent" class="tab-content">
        {{-- 未完成任务列表 --}}
        <div class="tab-pane fade in active" id="buildTask">
           <table class="table table-striped">
                <tbody>
                    @foreach($tasktodo as $v)
                       <tr>
                           <td class="first-cell">{{$v->title}}</td>
                           <td>@include('task.check')</td>
                           <td>
                               <button class="btn btn-primary" data-toggle="modal" data-target="#editmodel_{{$v->id}}">
                                <i class="fa fa-pencil-square-o"></i>
                               </button>
                               @include('task.edit')
                           </td>
                           <td>
                               <button class="btn btn-danger" data-toggle="modal" data-target="#delmodel_{{$v->id}}"><i class="fa fa-times" ></i></button>
                               @include('task.del')
                           </td>
                       </tr>


                    @endforeach
                </tbody>
           </table>
        </div>
        {{--已完成任务列表 --}}
        <div class="tab-pane fade" id="completeTask">
                <table class="table table-striped">
                   <tbody>
                        @foreach($taskdone as $v)
                           <tr>
                               <td>{{$v->title}}</td>
                               <td></td>
                           </tr>
                        @endforeach
                   </tbody>
                </table>
        </div>
    </div>

</div>
@endsection